<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<sec:authentication property="principal" var="currentPrincipal" scope="page" />

<div class="modal-dialog ms-modal-dialog" style="width: 600px;">
  <div class="modal-content">

    <div class="modal-header">
      <button type="button" class="close" name="cancel-redirect" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
      <h4 class="modal-title">设置油量并打印报销单</h4>
    </div>
    
    <form class="form-horizontal ms-form form-personal-info" method="POST" action="${ctx.host}/expense-sheets/setup-oils">
      
        <input type="hidden" name="_method" value="PATCH" />
      
      <c:forEach var="dispatchOrderId" items="${dispatchOrderIds}">
        <input type="hidden" name="dispatchOrderIds" value="${dispatchOrderId}" />
      </c:forEach>
      
      <input type="hidden" name="ratedOilUsage" value="${ratedOilUsage}" />
    
      <div class="form-group ms-form-group top-margin-15">
        <label class="col-xs-6 control-label">额定内部加油量：</label>
        <label class="col-xs-6 control-label" style="text-align: left;">
          <fmt:formatNumber value="${ratedOilUsage}" minFractionDigits="2" maxFractionDigits="2" />
        </label>
      </div>
      
      <div class="form-group ms-form-group">
        <label class="col-xs-6 control-label">实际内部加油量：</label>
        <div class="col-xs-4 role-check-oil-usage">
          <input type="text" name="actualOilUsage" class="form-control" value="<fmt:formatNumber value="${ratedOilUsage}" groupingUsed="false" minFractionDigits="2" maxFractionDigits="2" />" placeholder="实际内部加油量" autocomplete="off">
        </div>
      </div>
      
      <div class="form-group ms-form-group" id="check-info-div" style="display: none;">
        <label class="col-xs-6 control-label">错误信息：</label>
        <label id="check-info-label" class="col-xs-6 control-label" style="text-align: left;"></label>
      </div>

      <div class="modal-footer ms-modal-footer">
        <button type="submit" class="btn ms-btn btn-primary btn-set">设置</button>
        <button type="button" class="btn ms-btn ms-btn-gary" data-dismiss="modal">取消</button>
      </div>
        
    </form>
       
  </div>
</div>